find the first repeated character in a string java